#include "CObjectFactory.h"
#include "CBaseObject.h"


CObjectFactory::CObjectFactory()
{

}


CObjectFactory::~CObjectFactory()
{
	ShutDown();
}


CObjectFactory* CObjectFactory::GetInstance()
{
	static CObjectFactory factory;
	return &factory;
}


void CObjectFactory::StartUp(int allocateAmount)
{
	//start up and do work
	for(int i = 0; i < allocateAmount; i++)
	{
		m_vObjects.push_back(new CBaseObject());
	}

}


void CObjectFactory::ShutDown()
{
	while(!m_vObjects.empty())
	{
		delete m_vObjects.back();
		m_vObjects.pop_back();
	}
	
}


bool CObjectFactory::CreateObject(m_eObjectTypes type, bool isStaticObject)
{

	switch(type)
	{
	case CBASEOBJECT:
		{

		}
		break;
	default:
		{

		}
		break;
	}
	
	return true;
}


bool CObjectFactory::ReturnObject(CBaseObject* object)
{

	return true;
}